<!--
 * @Author: 代琪 1529992814@qq.com
 * @Date: 2022-04-13 16:25:51
 * @LastEditors: 代琪 1529992814@qq.com
 * @LastEditTime: 2022-08-02 11:19:00
 * @FilePath: \ctp-static-portal-front\src\views\bulletin\main.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <bulletinPage :style="wrap" :bulletinData="bulletinData" />
</template>

<script>
  import bulletinPage from './page/index';
  import { methods } from '@/utils';

  export default {
    name: 'Main',
    components: { bulletinPage },
    data() {
      return {
        bulletinData: [],
      };
    },
    computed: {
      wrap() {
        return {
          width: '100%',
        };
      },
    },
    mounted() {},
    created() {
      const dataFile = methods.getUrlParam('dataFile');
      $.getJSON(dataFile, ({ rows }) => {
        if (rows) {
          this.bulletinData = rows;
        }
      });
    },
  };
</script>
